/*
 * Copyright (c) 2007-2021 西安交通信息投资营运有限公司 版权所有
 */
package com.xci.xajtfb.bus.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.github.lvyanyang.core.BaseEntity;
import com.github.lvyanyang.core.Const;
import com.github.lvyanyang.core.XCI;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
 * 出租投诉信息表
 * @author 张谦 765870682@qq.com
 * @since 2021-03-02 9:40:00
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "出租投诉信息表")
public class WxComplaint extends BaseEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 投诉主键
	 */
    @JsonSerialize(using = ToStringSerializer.class)
	@Length(max = 50, message = "投诉主键长度不能超过{max}" )
	@ExcelIgnore
	@Excel(name = "投诉主键", width = 20d)
	@ApiModelProperty(value = "投诉主键", required = true, position = 1)
	private String complaintId;

	/**
	 * 投诉序号
	 */
	@Length(max = 50, message = "投诉序号长度不能超过{max}")
	@Excel(name = "投诉序号", width = 20d)
	@ApiModelProperty(value = "投诉序号", required = true, position = 2)
	private String serial;

	/**
	 * 车牌号码
	 */
	@Length(max = 50, message = "车牌号码长度不能超过{max}")
	@Excel(name = "车牌号码", width = 20d)
	@ApiModelProperty(value = "车牌号码", position = 3)
	private String carNumber;

	/**
	 * 司机姓名
	 */
	@Length(max = 50, message = "司机姓名长度不能超过{max}")
	@Excel(name = "司机姓名", width = 20d)
	@ApiModelProperty(value = "司机姓名", position = 4)
	private String driverName;

	/**
	 * 乘车时间
	 */
	@Length(max = 100, message = "乘车时间长度不能超过{max}")
	@Excel(name = "乘车时间", width = 20d)
	@ApiModelProperty(value = "乘车时间", position = 5)
	private String takeTaxiTime;

	/**
	 * 乘车地点
	 */
	@Length(max = 1000, message = "乘车地点长度不能超过{max}")
	@Excel(name = "乘车地点", width = 20d)
	@ApiModelProperty(value = "乘车地点", position = 6)
	private String takeTaxiPlace;

	/**
	 * 用户主键
	 */
	@NotBlank(message = "请输入用户主键")
	@Length(max = 50, message = "用户主键长度不能超过{max}")
	@ExcelIgnore
	@Excel(name = "用户主键", width = 20d)
	@ApiModelProperty(value = "用户主键", required = true, position = 7)
	private String userId;

	/**
	 * 投诉日期
	 */
	@Excel(name = "投诉日期", width = 20d, exportFormat = Const.DEFAULT_DATETIME_PATTERN)
	@ApiModelProperty(value = "投诉日期", required = true, position = 8)
	private Date date;

	/**
	 * 投诉大类
	 */
	@NotBlank(message = "请输入投诉大类")
	@Length(max = 50, message = "投诉大类长度不能超过{max}")
	@Excel(name = "投诉大类", width = 20d)
	@ApiModelProperty(value = "投诉大类", required = true, position = 9)
	private String target;

	/**
	 * 投诉小类
	 */
	@NotBlank(message = "请输入投诉小类")
	@Length(max = 50, message = "投诉小类长度不能超过{max}")
	@Excel(name = "投诉小类", width = 20d)
	@ApiModelProperty(value = "投诉小类", required = true, position = 10)
	private String type;

	/**
	 * 投诉内容
	 */
	@Length(max = 800, message = "投诉内容长度不能超过{max}")
	@Excel(name = "投诉内容", width = 20d)
	@ApiModelProperty(value = "投诉内容", position = 11)
	private String context;

	/**
	 * 状态 0:待受理 1:待处理 2:待回复 3:已回复
	 */
	@Excel(name = "状态 0:待受理 1:待处理 2:待回复 3:已回复", width = 20d)
	@ApiModelProperty(value = "状态 0:待受理 1:待处理 2:待回复 3:已回复", required = true, position = 12)
	private Integer state;

    /**
     * 附件路径(图片)
     */
    @ApiModelProperty(value = "附件路径(图片)", position = 12)
    private String uploadImgs;

    /**
     * 状态文本
     */
    @ApiModelProperty(value = "状态文本", position = 12)
    private String statusText;

    /**
     * 状态文本
     */
    public String getStatusText() {
        if(XCI.isEmpty(state)){
            return Const.Empty;
        }
        switch (state) {
            case 0:
                return "待受理";
            case 1:
                return "待处理";
            case 2:
                return "待回复";
            case 3:
                return "已回复";
        }
        return Const.Empty;
    }

	/**
	 * 手动编号
	 */
	@Length(max = 100, message = "手动编号长度不能超过{max}")
	@Excel(name = "手动编号", width = 20d)
	@ApiModelProperty(value = "手动编号", position = 13)
	private String manualNumber;

    /**
     * 分派部门主键
     */
    @Length(max = 50, message = "分派部门主键长度不能超过{max}")
    @ExcelIgnore
    @Excel(name = "分派部门主键", width = 20d)
    @ApiModelProperty(value = "分派部门主键", position = 22)
    private String deptId;

    /**
     * 行业受理ID
     */
    @Length(max = 100, message = "行业受理ID长度不能超过{max}")
    @ExcelIgnore
    @Excel(name = "行业受理ID", width = 20d)
    @ApiModelProperty(value = "行业受理ID", position = 25)
    private String industryAcceptId;

    /**
     * 出租车所属企业ID
     */
    @Length(max = 50, message = "出租车所属企业ID长度不能超过{max}")
    @ExcelIgnore
    @Excel(name = "出租车所属企业ID", width = 20d)
    @ApiModelProperty(value = "出租车所属企业ID", position = 23)
    private String enterpriseId;

    /**
     * 出租车所属企业名称
     */
    @Length(max = 100, message = "出租车所属企业名称长度不能超过{max}")
    @Excel(name = "出租车所属企业名称", width = 20d)
    @ApiModelProperty(value = "出租车所属企业名称", position = 24)
    private String enterpriseName;

	/**
	 * null
	 */
	@Excel(name = "null", width = 20d)
	@ApiModelProperty(value = "null", required = true, position = 18)
	private Integer deleted;

    /**
     * 回复结果
     */
    @Excel(name = "回复结果", width = 20d)
    @ApiModelProperty(value = "回复结果", position = 14)
    private String result;

    /**
     * 回复日期
     */
    @Excel(name = "回复日期", width = 20d, exportFormat = Const.DEFAULT_DATETIME_PATTERN)
    @ApiModelProperty(value = "回复日期", position = 15)
    private Date resultDate;

    /**
     * 使用的回复模板名
     */
    @Length(max = 100, message = "使用的回复模板名长度不能超过{max}")
    @Excel(name = "使用的回复模板名", width = 20d)
    @ApiModelProperty(value = "使用的回复模板名", position = 16)
    private String resultTemp;

    /**
     * 回复人
     */
    @Length(max = 50, message = "回复人长度不能超过{max}")
    @Excel(name = "回复人", width = 20d)
    @ApiModelProperty(value = "回复人", position = 17)
    private String resultHandleUser;

    /**
     * null
     */
    @Length(max = 50, message = "null长度不能超过{max}")
    @Excel(name = "null", width = 20d)
    @ApiModelProperty(value = "null", position = 19)
    private String reserve1;

    /**
     * null
     */
    @Length(max = 50, message = "null长度不能超过{max}")
    @Excel(name = "null", width = 20d)
    @ApiModelProperty(value = "null", position = 20)
    private String reserve2;

    /**
     * null
     */
    @Length(max = 200, message = "null长度不能超过{max}")
    @Excel(name = "null", width = 20d)
    @ApiModelProperty(value = "null", position = 21)
    private String reserve3;


}
